package com.fbty.mt.domain;
/**
 * 独享类ip实体类
 */
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "tab_only_ip_info", catalog = "mt", uniqueConstraints = {})
public class OnlyIpInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true)
	private Integer id;
	/**
	 * 入口ip地址
	 */
	private String entranceIp;

	/**
	 * 入口ip端口
	 */
	private int entrancePort;
	
	
	/**
	 * 出口Ip
	 */
	private String exportIp;
	
	/**
	 * 出口ip端口
	 */
	private int exportPort;
	
	/** 国家  */
	private String country;
	/** 地区  */
	private String region;
	/** 城市  */
	private String city;
	/** 延迟  */
	private String speed;
	/** 类型  */
	private String type;
	/** 上传时间  */
	private Date uploadTime;
	
	private String proxyType;
	
	
	/**
	 * 是否购买 0表示未购买  1表示购买
	 */
	private Integer state = 0;
	/**
	 * 是否正常
	 * used == 1  未正常
	 * used == 2 错误
	 * 默认used == 1
	 */
	private Integer used = 1;
	private double price;
	
	private String username;
	
	private String password;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	public String getEntranceIp() {
		return entranceIp;
	}
	public void setEntranceIp(String entranceIp) {
		this.entranceIp = entranceIp;
	}
	public int getEntrancePort() {
		return entrancePort;
	}
	public void setEntrancePort(int entrancePort) {
		this.entrancePort = entrancePort;
	}
	public String getExportIp() {
		return exportIp;
	}
	public void setExportIp(String exportIp) {
		this.exportIp = exportIp;
	}
	public int getExportPort() {
		return exportPort;
	}
	public void setExportPort(int exportPort) {
		this.exportPort = exportPort;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getRegion() {
		return region;
	}
	public void setRegion(String region) {
		this.region = region;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getSpeed() {
		return speed;
	}
	public void setSpeed(String speed) {
		this.speed = speed;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public Date getUploadTime() {
		return uploadTime;
	}
	public String getTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return sdf.format(uploadTime);
	}
	public void setUploadTime(Date uploadTime) {
		this.uploadTime = uploadTime;
	}
	
	
	
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	
	
	public String getProxyType() {
		return proxyType;
	}
	public void setProxyType(String proxyType) {
		this.proxyType = proxyType;
	}
	
	public Integer getUsed() {
		return used;
	}
	public void setUsed(Integer used) {
		this.used = used;
	}
	@Override
	public String toString() {
		return "OnlyIpInfo [id=" + id + ", country=" + country
				+ ", region=" + region + ", city=" + city + ", speed=" + speed
				+ ", type=" + type + ", uploadTime="
				+ uploadTime + ", state=" + state + "]";
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	
}
